<script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/ueditor.all.js"></script>
<h3>
    <a href="javascript:history.back();" class="actionBtn add">
        返回列表
    </a>
    {$title}
</h3>
<div class="idTabs">
    <div class="items">
        
                <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
                    <tr>
                        <td align="right" style="width:100px;">手机号码</td>
                        <td>
                           <span id="mobile">{$order.user}</span>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">短信内容</td>
                        <td>
                            <textarea name="cont" id="content" style="width:50%; height:100px;"></textarea>
                        </td>
                    </tr>
                </table>

            <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
                <tr>
                    <td width="131"></td>
                    <td>
                        <input class="btn" id="send_btn" type="submit" value="提交" />
                    </td>
                </tr>
            </table>
        
        
    </div>
</div>
<h3 style="margin-top:20px; font-size:15px;padding-bottom:10px; margin-bottom:10px;">短信发送记录</h3>
<table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
        <tr>
            <th width="30">ID</th>
            <th width="80" align="left">手机号</th>
            <th width="340" align="left">发送内容</th>
            <th width="100" align="center">发送时间</th>
        </tr>
        <foreach name="list" item="vo">
            <tr>
                <td align="center">{$vo.id}</td>
                <td align="left">{$vo.mobile}</td>
                <td>{$vo.sms_content}</td>
                <td align="center">{$vo.addtime|date="Y/m/d",###}</td>
            </tr>
        </foreach>
    </table>
    
<script>
$("#send_btn").click(function(){
	var mobile=$("#mobile").html();
	var content=$("#content").val();
	var url="__URL__/act_send_sms";
	var data={
		order_id:"{$order_id}",
		mobile:mobile,
		content:content
	}
	$.post(url,data,function(res){
		if(res==1){
			layer.msg("发送成功!");
			setTimeout(function(){
    						window.location.reload();
    					},2000);
			
		}else{
			layer.msg("发送失败!");
			return false;
		}
	})
	
});
</script>